home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1985 February / 1985-02.d64 / baker's dozen 5 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  32 lines

  1. 10 poke53280,0:poke53281,0:printchr$(147)chr$(5)
  2. 20 forz=54272to54295:pokez,0:next:rem clear sound chip
  3. 30 poke54296,15:poke54277,12:poke54278,252:poke54275,8:rem vol, adsr, hi pulse
  4. 35 printchr$(147):print:print"please turn up volume on tv or monitor.
  5. 36 [129]t[178]1[164]2000:[130]
  6. 40 [153][199](147):[153]:[153]:[153]"voice 1, 2, 3, 4 or 5?
  7. 50 geta$:ifa$<>"1"thenifa$<>"2"thenifa$<>"3"thenifa$<>"4"thenifa$<>"5"then50
  8. 60 ifa$="1"thenm=17:v=1
  9. 70 ifa$="2"thenm=33:v=2
  10. 80 ifa$="3"thenm=65:v=3
  11. 90 ifa$="4"thenm=129:v=4
  12. 100 ifa$="5"thenm=21:v=5
  13. 110 poke54276,m:rem waveform
  14. 120 printchr$(147)
  15. 130 c=int(50*rnd(1))+1:d=int(150*rnd(1))+1:e=int(100*rnd(1))+1
  16. 140 print:print"voice = ";v
  17. 150 print:print:print"hit space bar to play a random vibe     over and over."
  18. 160 print:print"repeat if desired."
  19. 170 print:print"hit any key to hear same sound once and list its values."
  20. 180 print:print"hold any key down to cycle through      random sounds."
  21. 190 print:print"hit 'v' to change voices."
  22. 200 ifpeek(203)=64thenpoke54273,0:poke54272,0:goto200
  23. 210 ifpeek(203)=60then280
  24. 220 ifpeek(203)=31then40
  25. 230 fora=ctodstepe:poke54273,a:nexta:forb=ctodstepe:poke54272,b:nextb
  26. 240 fora=dtocstep-e:poke54273,a:nexta:forb=dtocstep-e:poke54272,b:nextb
  27. 250 print:print"lo freq=";c", hi freq=";d", step=";e:poke54273,0:poke54272,0
  28. 260 ifpeek(203)=64then260
  29. 270 goto120
  30. 280 fora=ctodstepe:poke54273,a:nexta:forb=ctodstepe:poke54272,b:nextb
  31. 290 fora=dtocstep-e:poke54273,a:nexta:forb=dtocstep-e:poke54272,b:nextb:goto200
  32.